find the largest element in an array using a for loop in Java